import API from './api';
import http from '../plugin/http';
import type { IRobotconversationDataModal, IAddRobotconversationDataModal } from '../type';

const addRobotconversation = async (params: IAddRobotconversationDataModal) => {
    return await http.post(API.ROBOTCONVERSATION_ADD, params)
};

const getRobotconversationList = async (): Promise<IRobotconversationDataModal[]> => {
    return await http.get(API.ROBOTCONVERSATION_GETLIST)
};

const getRobotconversationListByKeywords = async (params: {
    keywords: string;
}): Promise<IRobotconversationDataModal[]> => {
    return await http.get(API.ROBOTCONVERSATION_GETLIST_KEYWORDS, { params })
};


export default {
    addRobotconversation,
    getRobotconversationList,
    getRobotconversationListByKeywords,
}